from django.db import models

# Create your models here.


class UserInfo(models.Model):
    user_type_choices = (
        (1, '普通'),
        (2, 'VIP'),
        (3, 'SVIP')
    )

    user_type = models.IntegerField(choices=user_type_choices)
    username = models.CharField(max_length=32)
    password = models.CharField(max_length=64)


class Token(models.Model):

    user = models.OneToOneField(UserInfo, related_name='user_token', on_delete=models.DO_NOTHING)
    token = models.CharField(max_length=64)